Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: olexii4 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
fffca8b to
48b1f58
Compare
a4c8897 to
0fb931b
Compare
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1552 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1552", name: che-dashboard}]}}]" |
1 similar comment
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1552 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1552", name: che-dashboard}]}}]" |
9d85cce to
a660342
Compare
- overrides.css: WCAG colour contrast improvements; label-required styling via global danger colour token; dark theme label contrast overrides - DevfileViewer: refactor to @uiw/react-codemirror with useMemo theming; remove obsolete snapshot; update test to use direct unit testing - BackupStatusBadge, ExpandableWarning: CSS module and component fixes - BasicViewer, ResourceIcon, Workspace/Status: minor CSS adjustments - websocketClient: add CONFIGMAP channel subscription helpers - WorkspacesList: AI tool column via plugin slot; Rows.tsx update - UserPreferences/GitConfig/Form/SectionUser: validation improvements - backend schemas.ts: add DevWorkspace and Devfile schema route constants - patchOptions.ts, restParams.ts, backend package.json: minor additions Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
scripts/fetch-plugins.sh (new): - Downloads plugin ZIPs from GitHub Releases for a given repo and ref - PLUGINS_LIST unset: queries Releases API, installs all plugins found - PLUGINS_LIST set (JSON array): installs only the listed plugins - LOCAL_PLUGINS: skips download, copies from a local checkout instead - Uses read loop instead of mapfile for Alpine sh / POSIX compatibility scripts/prepare-plugins.sh (new): - Wires fetched plugin files into the dashboard source tree - Generates packages/dashboard-frontend/src/plugins/index.ts build/dockerfiles/Dockerfile: - ARG PLUGINS_REPO, PLUGINS_REF, PLUGINS_LIST to control which plugins are fetched and from where - Fetches and prepares plugins before yarn build:packages - PLUGINS_LIST unset = install all; JSON array = install subset run/local-patch.sh (new): helper for local development patching .deps: update dependency declarations .gitignore: ignore plugins/ directory and generated index Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
- dashboard-plugins/package.json: add --passWithNoTests so jest exits cleanly when no test files exist yet in the SDK package - Layout/Sidebar/__tests__: mock NavigationAgentList; update snapshot to reflect the new mainNavWrapper + agentNavWrapper sidebar layout - pages/GetStarted/__tests__: update snapshot for PluginSlot spacer - services/bootstrap/__tests__: mock subscribeToAgentPodChanges and requestAiAgentRegistry; update imports to plugin symlink paths Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Plugin routes agents.ts, devfiles.ts now use relative imports for helpers that were moved into the plugin repository, fixing the webpack 'Can't resolve @/routes/api/helpers/*' build errors. Fix is in olexii4/che-dashboard-plugins@9d7c0b2 Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
The private dispatch<T>() helper returns T but TypeScript cannot prove
T is a Promise at the call site, causing TS2571 ('Object is of type
unknown') when .catch() is chained. Revert to the explicit 3-argument
thunk invocation for the one case that needs .catch() on the result.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>
tabOrder.indexOf() previously rejected string when activeTabKey was widened to UserPreferencesTab | string. Cast tabOrder to ReadonlyArray<string> for the indexOf call so plugin-registered tab keys (plain strings) are accepted. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
- EXCLUDED/prod.md: remove 10 stale entries for packages no longer in production deps (moved to plugins repo); add @eclipse-che/common@workspace:packages/common (local workspace package, unresolvable by dash-licenses) - EXCLUDED/dev.md: remove 2 stale entries; add @eclipse-che/license-tool@2.0.0 (dev tool, unresolvable by dash-licenses) - prod.md / dev.md: regenerate from current yarn.lock Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Update @eclipse-che/common version reference in yarn.lock from 7.117.0-next to 7.121.0-next, update dashboard-plugins package.json to match, and regenerate .deps/ license files with new unresolved dependency entries. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Two copies of these interfaces were merged during rebase — one from main (strict literal types) and one from the plugins branch (wider optional types). Remove the second copy and merge its extra fields (description, docsUrl, icon) into the canonical first declaration. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Two copies of aiProviderKeyBodySchema/aiProviderKeyParamsSchema were left in schemas.ts after the rebase, and two sets of aiConfig/aiRegistry route imports were left in app.ts (one pointing to plugin paths, one to the old @/routes/api paths). Remove the duplicates. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
…sts from tsc Remove fetchAiRegistry/fetchAiProviderKeyStatus from bootstrap (they referenced aiConfigActionCreators/selectAiConfigEnabled which no longer exist in the plugins branch - they were replaced by bootstrapPlugins). Exclude src/plugins/**/__tests__ from the main tsconfig so that external plugin test files (fetched at build time via symlinks) are not compiled by ts-loader during the production webpack build. Plugin tests are still run by jest with its own transform config. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Regenerate .deps/prod.md and .deps/dev.md to reflect the current dependency state after the rebase. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
The plugin path imports for registerAiConfigRoutes and registerAiRegistryRoute caused test failures: the plugin versions do not integrate cleanly with the existing jest mock infrastructure (getDevWorkspaceClient mock), returning 500 in tests. The local @/routes/api/aiConfig and @/routes/api/aiRegistry files are still present, fully functional, and correctly tested. Keep using them for these two routes; the new plugin routes (agents, devfiles, aiAgentRegistry, devfileSchema) remain plugin-sourced. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Three changes to fix the 44+ failing test suites: 1. sanitize-html ESM stub — sanitize-html@2.17.x ships as ESM; add a CJS stub in __mocks__/sanitize-html.js and wire it via moduleNameMapper. The stub implements real tag-stripping logic so BannerAlertBranding's sanitization assertion passes. 2. Plugin module stub — @/plugins/* paths are symlinked at build time by prepare-plugins.sh and don't exist locally. Add __mocks__/pluginStub.tsx and map all @/plugins/* imports to it so jest.mock() calls in tests can resolve the module. Plugin mapper placed before @/ mapper so it wins. 3. Suppress TS2307 in ts-jest — TypeScript still tries to resolve plugin paths through tsconfig even when moduleNameMapper redirects them. Set diagnostics.ignoreCodes: [2307] to suppress "Cannot find module" for these expected-absent symlinks. Also update the Sidebar snapshot to include the agentNavWrapper nav that was added to the sidebar during the plugins integration. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Three issues caused 44 test suites and 29 tests to fail:
1. sanitize-html ESM import — sanitize-html@2.17.x ships as ESM; add a
CJS stub in __mocks__/sanitize-html.js with real tag-stripping logic
(so BannerAlertBranding sanitization assertion still passes). Wired
via moduleNameMapper with higher priority than the @/ mapper.
2. Plugin module resolution — @/plugins/* paths are symlinked at build
time by prepare-plugins.sh and absent locally. Add a universal proxy
stub in __mocks__/pluginStub.tsx mapped to all @/plugins/* imports.
The proxy handles three module shapes:
- *Reducer exports → identity reducer (Redux requires a function)
- *ActionCreators exports → spyable proxy-object (bootstrap test spyOn)
- Everything else → stub thunk function
TS2307 "Cannot find module" suppressed in ts-jest diagnostics since
plugin paths are intentionally absent in local dev.
3. aiConfig initial state — rootReducer now sources aiConfigReducer from
the plugin stub (returns {} not { providers:[], tools:[], ... }).
MockStoreBuilder pre-seeds aiConfig with the expected initial shape so
selectors like selectAiTools return [] rather than undefined.
Also:
- Use a factory mock for NavigationAgentList in Sidebar test (auto-mock
of a Proxy returns an object, not a callable component).
- Update Sidebar snapshot to reflect the agentNavWrapper added during
plugin integration.
Assisted-by: Claude Sonnet 4.6
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
…ettier Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
The plugin's requestAiAgentRegistry is a plain action creator (not a thunk creator), so calling it as requestAiAgentRegistry()(dispatch, …) throws "is not a function". Use store.dispatch(...) instead, which works for both thunk and plain action creators. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Use this.dispatch() helper with explicit AppThunk<Promise<void>> cast so TypeScript accepts the plugin action creator return type regardless of whether the plugin stub or the real module is in scope. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
bootstrapPlugins already handles plugin initialization including the AI agent registry fetch. Calling requestAiAgentRegistry separately fails because the plugin's action creator is not a thunk creator. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
Regenerate .deps/ files to incorporate tar/js-yaml CVE fix from main and resolve newly unresolved prod/dev dependencies in EXCLUDED lists. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Oleksii Orel <oorel@redhat.com>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1552 (linux/amd64, linux/arm64, linux/s390x) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1552", name: che-dashboard}]}}]" |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What does this PR do?
Add lightweight plugin system to the Eclipse Che Dashboard.
It lets optional features be developed, versioned, and distributed
independently of the dashboard core, without forking the main repository.
The system has three parts:
packages/dashboard-plugins— shared type package and runtime registry(the "plugin SDK"). Published as
@eclipse-che/dashboard-plugins.(olexii4/che-dashboard-plugins),
released as ZIP archives on GitHub Releases.
scripts/fetch-plugins.sh,scripts/prepare-plugins.sh,src/plugins/) that downloads and mountsplugins into the dashboard build.
packages/dashboard-plugins— the Plugin SDKPurpose
Defines the TypeScript contracts (types, interfaces) that both the dashboard
core and plugin authors depend on. Also provides the runtime plugin registry
used by the frontend at startup.
No business logic lives here. The package exists purely to establish a
stable API surface between the dashboard and its plugins.
Package contents
Type reference
PluginManifestFrontendPluginPluginSlots— extension pointsworkspaceCreationComponentTypeworkspaceDetailsOverviewComponentTypeworkspacesListColumnColumnDefinitionuserPreferencesTabTabDefinitionfactoryParamsFactoryParamExtensionnavigationItemsNavigationItemDefinition[]loaderTabsLoaderTabDefinition[]NavigationItemDefinitioninsertAftercontrols ordering without the plugin knowing the full nav list.Example:
insertAfter: '/create-workspace'places "Devfiles" immediately after"Create Workspace".
LoaderTabDefinitionWorkspaceHooksRegistry API (used by the dashboard core)
Screenshot/screencast of this PR
What issues does this PR fix or reference?
Is it tested? How?
Release Notes
Docs PR